package com.kingschan.jeasytag.tag.power;

import javax.servlet.jsp.JspException;
import com.kingschan.jeasytag.core.annotations.tag.*;
import com.kingschan.jeasytag.tag.RootTag;

/**
 * searchbox params 
 * @author kingschan
 *date:2013-6-14
 */
@TagMetaData(CssClass = "", tag = ""
		,parseClass=""	
	)
public class SearchBoxParamTag extends RootTag implements Cloneable{
	private static final long serialVersionUID = 1L;
	@StringField(description="字段名字")
	private String field;
	@StringField(description="字段标题")
	private String title;
	@JsonField(description="editor")
	private String editor;



	@Override
	public int doEndTag() throws JspException {
		try {
			if (this.getParent() instanceof SearchBoxTag) {
				SearchBoxTag sbt = (SearchBoxTag) this.getParent();	
				SearchBoxParamTag sbpt =(SearchBoxParamTag) this.clone();
				sbt.addParam(sbpt);
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
		return super.doEndTag();
	}


	public String getField() {
		return field;
	}
	public void setField(String field) {
		this.field = field;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getEditor() {
		return editor;
	}
	public void setEditor(String editor) {
		this.editor = editor;
	}




}